package com.mz.ieann.aide.city.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>------------------------------------------------------
 * <p> Copyright (C) 2021 zhangmz, All rights reserved.
 * <p> If there is technical discussion, you can contact zhangmz90@foxmail.com
 * <p>------------------------------------------------------
 * <p> des
 * <p>
 *
 * @author Created by Administrator
 * @date on 2021 2021/10/27 21:19
 */
public class HouseResult implements Parcelable {

    private ArrayList<House> result;
    private String count;
    private boolean hasMore;
    private String totalCount;

    public HouseResult(){

    }

    protected HouseResult(Parcel in) {
        result = in.createTypedArrayList(House.CREATOR);
        count = in.readString();
        hasMore = in.readByte() != 0;
        totalCount = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(result);
        dest.writeString(count);
        dest.writeByte((byte) (hasMore ? 1 : 0));
        dest.writeString(totalCount);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<HouseResult> CREATOR = new Creator<HouseResult>() {
        @Override
        public HouseResult createFromParcel(Parcel in) {
            return new HouseResult(in);
        }

        @Override
        public HouseResult[] newArray(int size) {
            return new HouseResult[size];
        }
    };

    public ArrayList<House> getResult() {
        return result;
    }

    public void setResult(ArrayList<House> result) {
        this.result = result;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public boolean isHasMore() {
        return hasMore;
    }

    public void setHasMore(boolean hasMore) {
        this.hasMore = hasMore;
    }

    public String getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(String totalCount) {
        this.totalCount = totalCount;
    }

    @Override
    public String toString() {
        return "HouseResult{" +
                "result=" + result +
                ", count='" + count + '\'' +
                ", hasMore=" + hasMore +
                ", totalCount='" + totalCount + '\'' +
                '}';
    }
}
